package cn.liontalk.StrategyPattern.duck;

import cn.liontalk.StrategyPattern.Duck;
import cn.liontalk.StrategyPattern.impl.FlyNoWing;

/**
 * @author ZhouZhe
 * @version 1.0
 * @description 橡胶鸭子
 * @date 2019-01-09 16:27
 **/
public class RubberDuck extends Duck {


    public RubberDuck(){
        super();
        super.setFlyingStrategy(new FlyNoWing());
    }


    @Override
    public void display() {
        System.out.println("我嘴巴很红!");
    }

    @Override
    public void quack(){
        System.out.println("我是大黄鸭。。。");
    }


    @Override
    public void fly(){
        System.out.println("我不会飞!");
    }
}
